package cn.edu.nuc.ssm.service.impl;

import cn.edu.nuc.ssm.dao.BorrowMoneyManagerMapper;
import cn.edu.nuc.ssm.entity.BorrowMoneyManager;
import cn.edu.nuc.ssm.service.BorrowMoneyManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/5/19.
 */
@Service
public class BorrowMoneyManagerServiceImpl implements BorrowMoneyManagerService {

    @Autowired
    private BorrowMoneyManagerMapper borrowMoneyManagerMapper;

    @Override
    public List<BorrowMoneyManager> listWeihuanMoney(Integer uid,Integer status) {

        List<BorrowMoneyManager> borrowMoneyManagerList = borrowMoneyManagerMapper.findbyuidandstatus(uid, status);

        return borrowMoneyManagerList;
    }

    @Override
    public BorrowMoneyManager findbyId(Integer id) {

        return borrowMoneyManagerMapper.findbyId(id);
    }

    @Override
    public void updateStatus(Integer id) {

         borrowMoneyManagerMapper.updateStatusbyId(1,id);
    }
}
